﻿using Borg.AddOn;
using System;

namespace Borg
{
    [Serializable]
    internal class ComposerBehaviorCollection : BehaviorCollection
    {
        private readonly Composer _composer;

        protected override Runtime Runtime
        {
            get { return _composer.Runtime; }
        }

        public ComposerBehaviorCollection(INotifierNotificationHook hook, Composer composer)
            : base(hook)
        {
            _composer = composer;
        }

        protected override void Bind(Behavior behavior)
        {
            behavior.Bind(_composer);
        }

        protected override void Unbind(Behavior behavior)
        {
            behavior.Unbind(_composer);
        }
    }
}
